﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WH.Common.Cache
{
    public interface ICaching : ICacheService
    {
        void Add<V>(string key, V value, TimeSpan cacheDurationInTimeSpan);

        IEnumerable<string> GetAllKey(string key);

        void Remove(string key);

        void ContainsRemove(string key);

        string Info();

        Task<Dictionary<string, V>> HGetAllAsync<V>(string key);

        Task<bool> HMSetAsync<V>(string key, IDictionary<string, V> value);

        Task<V?> HGetAsync<V>(string key, string field);
    }
}
